<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">



<h:head>

	<title>InBox</title>



</h:head>

<h:body>
	<h2>View Messages</h2>

	<h:form>

		<h:dataTable value="#{inboxController.emails}" var="item">

			<h:column id="column1">
				<f:facet name="header">
					<h:outputText value="From" />
				</f:facet>
				<h:outputText value="#{item.id_sender}"></h:outputText>
			</h:column>

			<h:column id="column2">
				<f:facet name="header">
					<h:outputText value="Title" />
				</f:facet>

				<h:outputText value="#{item.type}"></h:outputText>
			</h:column>

			<h:column id="column3">
				<f:facet name="header">
					<h:outputText value="Date">

					</h:outputText>
				</f:facet>

				<h:outputText type="submit" id="data" value="#{item.date}">

				</h:outputText>


			</h:column>
			
			<h:column id="column4">
			
				<f:facet name="header">
					<h:outputText value="Action"></h:outputText>
				</f:facet>
				
				<h:commandLink value="Open" action="#{inboxController.verificaID(item.id)}">
					<f:param name="id" value="#{item.id}" />
				
				</h:commandLink>
			
			</h:column>
			
			
			
		</h:dataTable>
		<div>
		<h:inputTextarea rendered="#{inboxController.currentContent!=null}"
			value="#{inboxController.currentContent}"></h:inputTextarea>
	
		</div>

		<h:commandButton value="Accept"></h:commandButton>
		<h:commandButton value="Deny"></h:commandButton>
	</h:form>




</h:body>

</html>